package cc.siyecao.mapper.sample;

import cc.siyecao.mapper.provider.handlers.MetaObjectHandler;

import java.util.Date;
import java.util.HashMap;
import java.util.Map;

public class MyMetaObjectHandler implements MetaObjectHandler {
    @Override
    public Map<String, Object> insertFill() {
        Map<String, Object> fillMap = new HashMap<>();
        fillMap.put( "createDate", new Date() );
        fillMap.put( "updateDate", new Date() );
        return fillMap;
    }

    @Override
    public Map<String, Object> updateFill() {
        Map<String, Object> fillMap = new HashMap<>();
        fillMap.put( "updateDate", new Date() );
        return fillMap;
    }

}
